package com.nowcoder.community.repository;

import com.nowcoder.community.entity.Comment;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CommentMapper {
    List<Comment> selectCommentsByEntity(int entityType, int entityId, int offset, int limit);

    List<Comment> selectCommentsByUserId(int userId, int entityType, int offset, int limit);

    int countCommentsByEntity(int entityType, int entityId);

    int countCommentsByUserId(int userId, int entityType);

    int insertComment(Comment comment);

}
